package com.heiye.comment.biz.rpc;

import com.heiye.generator.id.generator.api.api.DistributedIdGeneratorFeignApi;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * @author: heiye
 * @date: 2025/07/25 下午6:45
 * @version: v1.0.0
 * @description: 分布式 ID 服务
 */
@Component
public class DistributedIdGeneratorRpcService {

    @Resource
    private DistributedIdGeneratorFeignApi distributedIdGeneratorFeignApi;

    public String generateCommentId() {
        return distributedIdGeneratorFeignApi.getSegmentId("leaf-segment-comment-id");
    }
}
